package com.xiyu.service.model.office.space;

import com.xiyu.service.model.base.BaseEntity;
import com.xiyu.service.model.office.building.OfficeBuilding;
import com.xiyu.service.model.office.building.OfficeBuildingUnit;
import com.xiyu.service.model.office.building.OfficeBuildingFloor;
import com.xiyu.service.model.unit.unit.UnitUnit;
import org.babyfish.jimmer.sql.*;
import org.jetbrains.annotations.Nullable;
import java.util.List;
import java.math.BigDecimal;

@Entity
public interface OfficeSpace extends BaseEntity {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    long id();

    @IdView
    @Nullable
    Long buildingId();

    @ManyToOne
    @Nullable
    OfficeBuilding building();

    @IdView
    @Nullable
    Long buildingUnitId();

    @ManyToOne
    @Nullable
    OfficeBuildingUnit buildingUnit();

    @IdView
    @Nullable
    Long buildingFloorId();

    @ManyToOne
    @Nullable
    OfficeBuildingFloor buildingFloor();

    @IdView
    @Nullable
    Long unitId();

    @ManyToOne
    @Nullable
    UnitUnit unit();

    Integer type();

    String name();

    String number();

    Integer status();

    String remark();

    BigDecimal area();

    @OneToMany(mappedBy = "space")
    List<OfficeSpaceWorker> spaceWorkers();

}